import { defineStore } from 'pinia'
import { toLogin } from '@/apis/loginAndRegis'
import { ref } from 'vue'

export const loginStore = defineStore('category', () => {
    const userInfo = ref([])

    const dologin = async (phone) => {
        const res = await toLogin(phone)
        userInfo.value = res.data
    }

    return {
        userInfo,
        dologin
    }
})